import gc,base_server
gc.enable()
def application(client_obj):
    header=client_obj.get_request()
    client_obj.write_head(200,{'Content-Type':'text/html'})
    client_obj.write_content(b'Hello!')
    client_obj.done()
    client_obj.shut()
if __name__ == "__main__":
    server=base_server.base_http_server('127.0.0.1',8991,application,10)
    server.serve_forever(10)
    #启动服务器，为了让服务器始终运行，加了这个结构
    while True:
        pass